
#include "Params.h"

using namespace ttg_internal;
using namespace ttg::extras;
using namespace ttg::math;
using namespace ttg::structures;

//-------------------
//--- ParamLoader ---
//-------------------

Params::Params(const Params *parent)
{
	if (parent != NULL)
	{
		this->vectors = new OneTypeParamLoader<vec3f>(&parent->getVectors());
		this->matrices = new OneTypeParamLoader<mat4x4f>(&parent->getMatrices());
		this->floats = new OneTypeParamLoader<float>(&parent->getFloats());
	}
	else
	{
		this->vectors = new OneTypeParamLoader<vec3f>(NULL);
		this->matrices = new OneTypeParamLoader<mat4x4f>(NULL);
		this->floats = new OneTypeParamLoader<float>(NULL);
	}
}

Params::~Params()
{
	SAFE_DELETE(vectors);
	SAFE_DELETE(matrices);
	SAFE_DELETE(floats);
}
